//
//  SRDeviceInfo+description.m
//  CareRingApp
//
//  Created by Linktop on 2022/7/26.
//

#import "SRDeviceInfo+description.h"
#import "ConfigModel.h"

@implementation SRDeviceInfo (description)
+(NSString *)descryOfErrorReason:(CMD_EXECTE_ERROR_REASON)reason
{
    NSString *desc = @"";
    switch (reason) {
        case REASON_1:  // 设备自动测量中
        {
            desc = @"The equipment is automatically measuring";
        }
            break;
        case REASON_2:// 设备在运动模式测量中
        {
            desc = @"The device is in motion mode measurement";
        }
            break;
        case REASON_3: // 设备app测量中
        {
            desc = @"The device is measuring in real time";
        }
            break;
        case REASON_4: // 参数错误
        {
            desc = @"Command parameter error";
        }
            break;
            
        default:
            break;
    }
    
    return desc;
}

+(NSString *)colorDesc:(DEV_COLOR)color;
{
   
    switch (color) {
        case DEV_COLOR_SILVER:
        {
            return _L(L_DEV_COLOR_SILVER);
        }
            break;
        case DEV_COLOR_DARK:
        {
            return _L(L_DEV_COLOR_BLACK);

        }
            break;
        case DEV_COLOR_GOLD:
        {
            return _L(L_DEV_COLOR_GOLD);

        }
            break;
        case DEV_COLOR_ROSE_GOLD:
        {
            return _L(L_DEV_COLOR_ROSE_GOLD);
        }
            break;
        case DEV_COLOR_GOLD_MIX_SILVER: //金/银混色(Gold and silver mixed)
        {
            return _L(L_DEV_COLOR_G_MIX_S);
        }
            break;
        case   DEV_COLOR_PURPLE_MIX_SILVER : //紫/银混色(Purple and silver mixed)
        {
            return _L(L_DEV_COLOR_PURPLE_MIX_SILVER);

        }
            break;
        case   DEV_COLOR_ROSEGOLD_MIX_SOLVER : //玫瑰金/银混色(Rose gold and silver mixed)
        {
            return _L(L_DEV_COLOR_ROSEGOLD_MIX_SILVER);

        }
            break;
        default:
            return @"unknow";
            break;
    }
    return @"unknow";
}


+(NSString *)sizeDesc:(int)size
{
    return [NSString stringWithFormat:@"%@%d", _L(L_DEV_SIZE_US), size];
}



@end
